const Ready = require('./ready.js');
class Success extends Ready {
  constructor() {
    super();
  }
  setMask() {
    let mask = game.add.graphics(0, 0);
    mask.beginFill("0x000000", 0.2);
    mask.drawRect(0, 0, this.bw, this.bh);
  }
  setPop() {
    this.setMask();
    let pop = game.add.image(this.cx, this.cy, 'player_pop');
    pop.anchor.setTo(0.5, 0.5);
  }
  create() {
    this.setBg();
    // this.setTime();
    // this.setNum();
    this.setPop();
    setTimeout(function () {
      console.log("game success");
      window.__gameFinished();
      //  跳转到转盘
    }, 2000)
    // game.input.onDown.add(v => {
    //   console.log("game success");
    //   window.__gameFinished();
    //   //  跳转到转盘
    // })
  }
}

module.exports = Success;